package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.system.constant.RegexPattern;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 司机管理对象 driver
 *
 * @author trip
 * @date 2024-09-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("driver")
public class Driver extends BaseEntity implements Serializable{
private static final long serialVersionUID = 1L;

    /** 司机id */
            @Excel(name = "司机id")
        @TableId(value = "driver_id" ,type = IdType.AUTO)
        private Long driverId;
    /** 车辆信息id */
            @Excel(name = "车辆信息id")
        private Long carId;
    /** 司机账号 */
            @Excel(name = "司机账号")
            @Length(min=11, max=11,message = "账号11位")
        private String userName;
    /** 司机昵称 */
            @Excel(name = "司机昵称")
        private String nickName;
    /** 密码 */

    @Pattern(regexp = RegexPattern.PASSWORD_REGEX,message = "密码8~32位的字母、数字、下划线")
        private String password;
    /** 司机类型（00系统用户） */
            @Excel(name = "司机类型", readConverterExp = "0=0系统用户")
        private String userType;
    /** 司机邮箱 */
            @Excel(name = "司机邮箱")
            @Email(message = "不是邮箱")

        private String email;
    /** 手机号码 */
            @Excel(name = "手机号码")

            @Pattern(regexp = RegexPattern.PHONE_REGEX,message = "手机号格式不对")
        private String phoneNumber;
    /** 司机性别（0男 1女 2未知） */
            @Excel(name = "司机性别", readConverterExp = "0=男,1=女,2=未知")
        private String sex;
    /** 头像地址 */
            @Excel(name = "头像地址")

        private String avatar;
    /** 驾照照片路径 */
            @Excel(name = "驾照照片路径")

        private String drivingLicenseImage;
    /** 驾驶证号码 */
            @Excel(name = "驾驶证号码")

        private String drivingLicenseNumber;
    /** 删除标志（0代表存在 2代表删除） */
        @TableLogic
        private String delFlag;
    /** 状态（0正常 1停用） */
            @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
        private String status;
        }


